package com.bamboo.eduservice.feign;

import com.bamboo.eduservice.feign.fallback.VodFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 订单服务feignClient
 *
 * @author jack.wu
 */
@FeignClient(value = "service-order", fallback = VodFeignClientFallback.class)
public interface OrderFeignClient {


    /**
     * 根据课程id和用户id查询订单表中订单状态
     *
     * @param courseId 课程id
     * @param memberId 用户id
     * @return 订单状态
     */
    @GetMapping("isBuyCourse/{courseId}/{memberId}")
    boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);


}
